import {createRoter,createWebHistory} from 'vue-router'
import Home from '../pages/Home.vue'
import About from '../pages/About.vue'
const routes = [
    {
         path: '/',
         name: 'Home',
         component: Home,
         meta:{
            title: '首页'
         },
         childern: [
            {
                path: 'about',//没有斜杠是因为子路由
                name: 'About',
                component: About
            }
         ]
}
]
const router  = createRoter(
    {
        history: createWebHistory(),
        routes//key 和value一样可以将其去掉
    }
)

export default router